<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="common-head">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no"/>
    <title>TEST</title>

    <script th:src="@{/sb-admin-1.0.4/js/jquery.js}"></script>

</head>

<body>

<form action="" th:id="form" >

    <input type="text" th:if="${cus.id == '123'}" name="test" value="123" id="test">
    <input type="text" th:if="${cus.id == '456'}" name="test" value="456" id="test2">


</form>

<button id="button" onclick="test()">test</button>

</body>
<script th:inline="javascript">





    function test(){
        //$("#form").find("[name=test]").val(1);

        $("input[name='sex']:checked").val(0);
       let man= $("input[name='sex']:checked").val();
       let woman= $("#woman").val();
       alert(man);

       alert(woman);

    }


/*
$(function () {
    let cus = [[${cus}]];
    console.log(cus);
    console.log(cus.name)
    let cusMap = [[${cusMap}]];
    console.log(cusMap);
    console.log(cusMap.name)
})
*/


</script>
</html>
